package mark.tom.friend;

import android.content.ContentResolver;
import android.content.Context;

public class FRollBuilder {

    String packageName;
    ContentResolver contentResolver;
    ContentChecker serverChecker, extraChecker;
    CheckResultNotifier checkResult;

    FRollBuilder(Context mContext) {
        if (null == mContext) {
            throw new NullPointerException();
        }
        this.packageName = mContext.getPackageName();
        this.contentResolver = mContext.getContentResolver();
    }

    public FRollBuilder serverChecker(ContentChecker contentChecker) {
        this.serverChecker = contentChecker;
        return this;
    }

    public FRollBuilder extraChecker(ContentChecker contentChecker) {
        this.extraChecker = contentChecker;
        return this;
    }

    public FRollBuilder checkResultNotifier(CheckResultNotifier checkResult) {
        this.checkResult = checkResult;
        return this;
    }

    public void build() {
        FRoll.build(this);
    }
}
